#pragma once

#include <ros/message_traits.h>
#include <ros/serialization.h>

#include "ActDemo.pb.h"

namespace ros {
// Begin:ros1_protobuf_msg_bridge::ActDemoResult
namespace message_traits {
    template <>
    struct MD5Sum<ros1_protobuf_msg_bridge::ActDemoResult> {
        static const char* value() {
            return "b3380cddb201f81ad75490bcb005788c";
        }
        static const char* value(ros1_protobuf_msg_bridge::ActDemoResult const& o) {
            return value();
        }
    };

    template <>
    struct DataType<ros1_protobuf_msg_bridge::ActDemoResult> {
        static const char* value() {
            return "ros1_protobuf_msg_bridge/ActDemoResult";
        }
        static const char* value(ros1_protobuf_msg_bridge::ActDemoResult const& o) {
            return value();
        }
    };

    template <>
    struct Definition<ros1_protobuf_msg_bridge::ActDemoResult> {
        static const char* value() {
            return "ros1_protobuf_msg_bridge/ActDemoResult";
        }
        static const char* value(ros1_protobuf_msg_bridge::ActDemoResult const& o) {
            return value();
        }
    };
}  // namespace message_traits

namespace serialization {
    template <>
    struct Serializer<ros1_protobuf_msg_bridge::ActDemoResult> {
        template <typename Stream>
        inline static void write(Stream& stream, const ros1_protobuf_msg_bridge::ActDemoResult& o) {
            std::string ser_bytes;
            if (!o.SerializeToString(&ser_bytes)) {
                std::cerr << "Serialization failed[ros1_protobuf_msg_bridge::ActDemoResult]" << std::endl;
                return;
            }
            uint32_t length = static_cast<uint32_t>(ser_bytes.size());
            memcpy(stream.advance(4), &length, 4);
            memcpy(stream.advance(ser_bytes.size()), ser_bytes.c_str(), ser_bytes.size());
        }

        template <typename Stream>
        inline static void read(Stream &stream, ros1_protobuf_msg_bridge::ActDemoResult &o) {
            uint32_t length;
            memcpy(&length, stream.advance(4), 4);
            std::string deser_bytes;
            deser_bytes.resize(length);
            memcpy(&deser_bytes[0], stream.advance(length), length);
            if (!o.ParseFromString(deser_bytes)) {
                std::cerr << "Deserialization failed[ros1_protobuf_msg_bridge::ActDemoResult]" << std::endl;
                return;
            }
        }

        inline static uint32_t serializedLength(const ros1_protobuf_msg_bridge::ActDemoResult& o) {
            return sizeof(uint32_t) + o.ByteSizeLong();
        }
    };
}  // namespace serialization
// End:ros1_protobuf_msg_bridge::ActDemoResult
}